<!DOCTYPE HTML>
<html>
<head>
    <title>Quarkus先锋论坛</title>
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/bootstrap/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/bootstrap/css/community.css">
    <link rel="icon" href="/images/logo.png" type="image/x-icon"/>
    <script src="/js/jquery-3.5.1.min.js"></script>
    <script src="/js/jquery.cookie.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js" type="application/javascript"></script>
    <script src="/js/community.js" type="application/javascript"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="google-site-verification" content="QGf2OqDw91EjWtNE07HoLJi0x0G2rIYylk6jn6JEoEQ" />
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-89103576-8"></script>
    <script type="text/javascript" src="/js/bbs.js"></script>
</head>
<script type="application/javascript">
    window.onload = function () {
    	var weir_token = $("#weir-token").val();
    	// console.log("----------weir-token--------" + weir_token)
    	if(weir_token == undefined || weir_token.length == 0){
    		weir_token = window.localStorage.getItem("quarkus-bbs-token");
    	}else{
    		window.localStorage.setItem("quarkus-bbs-token", weir_token);
    		$.cookie('weir-cookie-toekn', weir_token, { expires: 360 });
    	}
    	var weir_token_user = $("#weir-token-user").val();
    	// console.log("----------weir-token-user--------" + weir_token_user)
    	if(weir_token_user == undefined || weir_token_user.length == 0){
    		weir_token_user = window.localStorage.getItem("weir-token-user");
    	}else{
    		window.localStorage.setItem("weir-token-user", weir_token_user);
    	}
        /* var closable = window.localStorage.getItem("closable");
        if (closable == "true") {
            window.close();
            window.localStorage.removeItem("closable");
        } */
    }
</script>
<body>
<input type="hidden" id="weir-token" value="{bbsVo.token}">
{#if bbsVo.user??}
<input type="hidden" id="weir-token-user" value="{bbsVo.user.userName}">
{/if}
<div>
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Quarkus先锋论坛</span>
                </button>
                <a class="navbar-brand" href="/bbs">Quarkus先锋论坛</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <form class="navbar-form navbar-left" action="/bbs" method="get">
                    <div class="form-group">
                        <input type="text" class="form-control" name="search" placeholder="搜索问题">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
                
                <ul class="nav navbar-nav navbar-right">
                    {#if bbsVo.user??}
                    <li>
                        <a href="/publish">发帖</a>
                    </li>
                    <li><a href="/profile/replies">通知 <span class="badge" text="session.unreadCount"></span></a>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false">
                            <span>{bbsVo.user.userName}</span>
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="/profile/questions">我的问题</a></li>
                            <li><a href="/logout">退出登录</a></li>
                        </ul>
                    </li>
                    {#else}
                    <li>
                        <a href="#" data-toggle="modal" data-target="#myModal">登录</a>
                    </li>
                    {/if}

                </ul>
            </div>
        </div>
    </nav>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="margin-top: 200px;wid 300px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">登录注册</h4>
                </div>
                <div class="modal-body" style="text-align:center">
                    <a href="https://gitee.com/oauth/authorize?client_id=68fc089e7110da832d9365c2a40de98210f7f310b1e311a11b8545b0b86c2e7a&redirect_uri=http://a881-223-91-168-24.ngrok.io/oauth-gitee/callback&response_type=code&state=weir)">
                        <img src="/images/gitee.png">
                    </a>
                    <a href="https://github.com/login/oauth/authorize?client_id=f2bb003d1642d62b8cf5&redirect_uri=http://a881-223-91-168-24.ngrok.io/oauth-github/callback&scope=user&state=weir">
                        <img src="/images/github.png">
                    </a>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h3><span class="glyphicon glyphicon-list" aria-hidden="true"></span> 发现</h3>
            <ul class="nav nav-tabs">
                <li role="presentation" class="{#if bbsVo.sort == 'new'}active{#else}{/if}">
                    <a href="bbs?sort=new">最新</a>
                </li>
                <li role="presentation" class="{#if bbsVo.sort == 'hot30'}active{#else}{/if}">
                    <a href="bbs?sort=hot30">30天最热</a>
                </li>
                <li role="presentation" class="{#if bbsVo.sort == 'hot7'}active{#else}{/if}">
                    <a href="bbs?sort=hot7">7天最热</a>
                </li>
                <li role="presentation" class="{#if bbsVo.sort == 'hot'}active{#else}{/if}">
                    <a href="bbs?sort=hot">最热</a>
                </li>
                <li role="presentation" class="{#if bbsVo.sort == 'no'}active{#else}{/if}">
                    <a href="bbs?sort=no" class="red">消灭零回复</a>
                </li>
            </ul>
            {#for posts in bbsVo.pageView.records}
            <div class="media">
                <div class="media-left">
                    {#if posts.user??}
                    <a href="#">
                        <img class="media-object img-rounded"
                             src="{posts.user.profileImageUrl}">
                    </a>
                    {/if}
                </div>
                <div class="media-body">
                    <h5 class="media-heading">
                    {#if posts.sticky}
                        <span style="color: #c74747">[置顶]</span>
                        {/if}
                        <a href="/post/{posts.id}" text="{posts.title}">{posts.title}</a>
                    </h5>
                    <span class="text-desc">{posts.commentCount} 个回复 • {posts.viewCount} 次浏览 • {posts.createDate}</span>
                </div>
            </div>
            {/for}
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    {#if bbsVo.pageView.currentPage > 1}
					  <li itemprop="name"><a class="page-numbers" href="{bbsVo.index}?sort={bbsVo.sort}&page={bbsVo.pageView.minusOne}">上一页</a></li>
					{/if}
					
					{#for wp in bbsVo.pageView.pageIndex.endIndex}
						{#if bbsVo.pageView.currentPage eq wp}
						  <li itemprop="name"><span class="page-numbers current">{wp}</span></li>
						{#else}
						  <li itemprop="name"><a class="page-numbers" href="{bbsVo.index}?sort={bbsVo.sort}&page={wp }">{wp}</a></li>
						{/if}
					{/for}
					
					{#if bbsVo.pageView.currentPage < bbsVo.pageView.totalPage}
					  <li itemprop="name"><a class="page-numbers" href="{bbsVo.index}?sort={bbsVo.sort}&page={bbsVo.pageView.addOne}">下一页</a></li>
					{/if}
                </ul>
            </nav>
        </div>
        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
            <div insert="notice :: notice"></div>
            <!--相关问题-->
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>热门标签</h4>
                {#for tag in bbsVo.tags}
                <a href="/bbs?sort={bbsVo.sort}&tag={tag}&page={bbsVo.page}"
                   text="{tag}" class="community-tag">{tag}</a>
                   {/for}
            </div>
            <div insert="side :: side"></div>
        </div>
    </div>
</div>
<div class="footer">
    <div>Copyright © 2022  豫ICP备2021013020号-1 · All Rights Reserved Powered By <a href="http://www.loveweir.com" target="_blank"> 爱威尔 </a></div>
</div>
</body>
</html>